]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
altTab: Skip unminimize effect when cycling to a window
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 15 Sep 2016 15:41:52 +0000 (17:41 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Sun, 18 Sep 2016 09:00:54 +0000 (11:00 +0200)
Similar to windows on another workspace, selecting a minimized window
doesn't look quite right - the selected window disappears, then animates
back in. Fix this by adding support for skipping the next effect to the
wm and use it to bypass the unminimize animation.

https://bugzilla.gnome.org/show_bug.cgi?id=771536

js/ui/altTab.js
js/ui/windowManager.js

index 27aa2d7bfdb3feed964c8b9feaa6db2281d91377..dfdf9c3f93c26faf2d3808fa268de482e00b7d95 100644 (file)
@@ -448,6 +448,11 @@ const CyclerPopup = new Lang.Class({
         let ws = window.get_workspace();
         let activeWs = global.screen.get_active_workspace();
 
+        if (window.minimized) {
+            Main.wm.skipNextEffect(window.get_compositor_private());
+            window.unminimize();
+        }
+
         if (activeWs == ws) {
             Main.activateWindow(window);
         } else {
index 8b0398b3df4d6663a7641263c4fc0c7052ed0d0c..a3872af4d2936eecfdcb0349d240ccf203f18680 100644 (file)
@@ -683,6 +683,8 @@ const WindowManager = new Lang.Class({
 
         this._dimmedWindows = [];
 
+        this._skippedActors = [];
+
         this._allowedKeybindings = {};
 
         this._isWorkspacePrepended = false;
@@ -1035,6 +1037,10 @@ const WindowManager = new Lang.Class({
         this._workspaceTracker.keepWorkspaceAlive(workspace, duration);
     },
 
+    skipNextEffect: function(actor) {
+        this._skippedActors.push(actor);
+    },
+
     setCustomKeybindingHandler: function(name, modes, handler) {
         if (Meta.keybindings_set_custom_handler(name, handler))
             this.allowKeybinding(name, modes);
@@ -1061,6 +1067,9 @@ const WindowManager = new Lang.Class({
     },
 
     _shouldAnimateActor: function(actor, types) {
+        if (this._removeEffect(this._skippedActors, actor))
+            return false;
+
         if (!this._shouldAnimate())
             return false;